Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(gcc): compatibility with GCC14 #435

Merged
merged 2 commits into from
Jul 18, 2024
Merged

fix(gcc): compatibility with GCC14 #435

merged 2 commits into from
Jul 18, 2024

Conversation

mratsim
Copy link
Owner

@mratsim mratsim commented Jul 17, 2024

GCC 14 made passing an "incompatible" pointer type to another function an error.

The issue comes from builtin add-carry and sub-borrow.
Nim uint64 maps to NU64 which itself maps to uint64_t which itself maps to long unsigned int on x86-64.

However _addcarry_u64 has for signature unsigned char _addcarry_u64 (unsigned char c_in, unsigned __int64 a, unsigned __int64 b, unsigned __int64 * out)

unsigned __int64 maps to unsigned long long which is deemed incompatible with uint64_t so we need an explicit cast.

@mratsim mratsim merged commit 4dea093 into master Jul 18, 2024
24 checks passed
@mratsim mratsim deleted the gcc14 branch July 18, 2024 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant